<?php
/**
 * Created by PhpStorm.
 * User: liangtiehui
 * Date: 2015/12/31
 * Time: 8:41
 */

namespace Builder;

/**
 * 具体建造者
 * Class ConreteBuilder
 * @package Builder
 */
class ConreteBuilder extends Builder
{
    private $_product;

    public function __construct()
    {
        $this->_product = new Product();
    }

    public function buildPart1()
    {
        $this->_product->add("Part1");
    }

    public function buildPart2()
    {
        $this->_product->add("Part2");
    }

    public function getResult()
    {
        return $this->_product;
    }
}